/*
 * @Author: SongKaiWang
 * @Date: 2023-11-24 08:35:00
 * @LastEditTime: 2023-11-29 13:31:20
 */
import request from '@/utils/request'

/**问题订单-根据订单号查询列表 */
export function getOrderListByOrderNo(params) {
  return request({
    url: '/distribution/order/getOrderListByOrderNo',
    params
  })
}

/**平台申请（买家拒收）-查询数据 */
export function getPackageInfoByPackageNo(packageNo) {
  return request({
    url: `/distribution/orderQuestionApply/getPackageInfoByPackageNo?packageNo=${packageNo}`,
  })
}





/**问题订单-根据订单号查询订单sku列表 */
export function getOrderApplyInfo(data) {
  return request({
    url: '/distribution/order/getOrderApplyInfo',
    method: 'post',
    data,
  })
}





/**插入申请记录 */
export function insertOrderQuestionApply(data) {
  return request({
    url: '/distribution/orderQuestionApply/insertOrderQuestionApply',
    method: 'post',
    data,
  })
}



/**插入申请记录-买家拒收 */
export function orderQuestionRejectApply(data) {
  return request({
    url: '/distribution/orderQuestionApply/orderQuestionRejectApply',
    method: 'post',
    data,
  })
}

/**获取申请列表 */
export function getOrderQuestionApplyList(params) {
  return request({
    url: '/distribution/orderQuestionApply/getOrderQuestionApplyList',
    params,
  })
}
/**获取全部sku申请列表 */
export function orderQuestionApplygetSeller(params) {
  return request({
    url: '/distribution/orderQuestionApply/getSellerSkuReissueList',
    params,
  })
}

/**卖家编辑申请 */
export function updateOrderQuestionApply(data) {
  return request({
    url: '/distribution/orderQuestionApply/updateOrderQuestionApply',
    method: 'post',
    data,
  })
}



/**提交审核 */
export function refundSubmit(data) {
  return request({
    url: '/distribution/orderQuestionApply/refundSubmit',
    method: 'post',
    data,
  })
}

/**获取申请sku关联的供应商 */
export function getSkuDistributorByType(params) {
  return request({
    url: '/distribution/orderQuestionApply/getSkuDistributorByType',
    params,
  })
}

/**获取SKU列表-分页 */
export function getSkuListNoPage(params) {
  return request({
    url: '/distribution/orderQuestionApply/getSkuList',
    params
  })
}

/**生成sku序列号 */
export function createSkuSerializableList(data) {
  return request({
    url: '/distribution/orderQuestionApply/createSkuSerializableList',
    method: 'post',
    data,
  })
}

/** 审核订单详情查询*/
export function getOrderQuestionApplyDetails(params) {
  return request({
    url: `/distribution/orderQuestionApply/getOrderQuestionApplyDetails?applyId=${params}`,
  })
}
/**查询审核包裹详情 */
export function getOrderQuestionApplyDetailsByReject(params) {
  return request({
    url: `/distribution/orderQuestionApply/getOrderQuestionApplyDetailsByReject?applyId=${params}`,
  })
}

/**问题订单完成处理 */
export function completeHandle(data) {
  return request({
    url: '/distribution/orderQuestionApply/completeHandle',
    method: 'post',
    data,
  })
}

/**提交审核（退货或者退款） */
export function confirmOrderQuestionApplyBarterStep1(data) {
  return request({
    url: '/distribution/orderQuestionApply/confirmOrderQuestionApplyBarterStep1',
    method: 'post',
    data,
  })
}
/**问题订单驳回 */
export function rejectOrderQuestionApply(data) {
  return request({
    url: '/distribution/orderQuestionApply/rejectOrderQuestionApply',
    method: 'post',
    data,
  })
}

/**获取再入库序列号列表 */
export function getOrderWarehouseSerializableList(params) {
  return request({
    url: '/distribution/orderQuestionApply/getOrderWarehouseSerializableList',
    params
  })
}

/**获取再入库序列号列表-(分页) */
export function getOrderWarehouseSerializableListByPage(params) {
  return request({
    url: '/distribution/orderQuestionApply/getOrderWarehouseSerializableListByPage',
    params
  })
}

/**删除再入库序列号*/
export function deleteOrderWarehouseSerializable(id) {
  return request({
    url: `/distribution/orderQuestionApply/deleteOrderWarehouseSerializable/${id}`,
    method: 'DELETE'
  })
}

/**获取再入库序列号信息 */
export function getOrderWarehouseSerializableInfo(data) {
  return request({
    url: '/distribution/orderQuestionApply/getOrderWarehouseSerializableInfo',
    method: 'post',
    data,
    repetitiveConfig: {
      neglectful: true,
      interval: 3000
    }
  })
}
/**获取补发，换货sku列表 */
export function getReissueSkuListByOrderApplyId(params) {
  return request({
    url: '/distribution/orderQuestionApply/getReissueSkuListByOrderApplyId',
    params
  })
}

/**最终费用技计算 */
export function computeDelivery(data) {
  return request({
    url: '/distribution/orderQuestionApply/computeDelivery',
    method: 'post',
    data,
    repetitiveConfig: {
      neglectful: true,
      interval: 3000
    },
  })
}

/**获取换货第一次确认信息 */
export function getOrderQuestionApplyBarterStep1Info(data) {
  return request({
    url: '/distribution/orderQuestionApply/getOrderQuestionApplyBarterStep1Info',
    method: 'post',
    data,
  })
}

/**换货第一次确认校验序列号是否匹配 */
export function checkAgainWarehouse(params) {
  return request({
    url: '/distribution/orderQuestionApply/checkAgainWarehouse',
    method: 'get',
    params,
  })
}
/**批量设置sku序列过期时间*/
export function setIsExpiredTime(data) {
  return request({
    url: '/distribution/orderQuestionApply/setIsExpiredTime',
    method: 'post',
    data
  })
}

/**买家拒收*/
export function rejectSubmit(data) {
  return request({
    url: '/distribution/orderQuestionApply/rejectSubmit',
    method: 'post',
    data
  })
}